import Vue from 'vue'
import Router from 'vue-router'
import login from '../pages/login'
import Home from '../pages/Home'
import homepage from '../pages/homepage'
import collectionChannel from '../pages/collectionChannel'
import message from '../pages/message'
import comment from '../pages/comment'
import modification from '../pages/modification'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/Home',
      name: 'Home',
      component: Home,
      children:[
        {
          path:'/Home/homepage',
          name:'homepage',
          component:homepage,
          meta: {
            requireAuth: true
          }
        },
        {
          path:'/Home/collectionChannel',
          name:'collectionChannel',
          component:collectionChannel,
          meta: {
            requireAuth: true
          }
        },
        {
          path:'/Home/message',
          name:'message',
          component:message,
          meta: {
            requireAuth: true
          }
        },
        {
          path:'/Home/comment',
          name:'comment',
          component:comment,
          meta: {
            requireAuth: true
          }
        },
        {
          path:'/Home/modification',
          name:'modification',
          component:modification,
          meta: {
            requireAuth: true
          }
        }
      ]
    }
  ]
})